using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace HadronData
{
    public class LayerContentTypeReader : ContentTypeReader<Layer>
    {
        protected override Layer Read(ContentReader p_contentReader, Layer p_layer)
        {
            p_layer = new Layer();
            p_layer.Name = p_contentReader.ReadString();
            p_layer.Position = p_contentReader.ReadVector2();
            p_layer.Orientation = p_contentReader.ReadSingle();
            p_layer.AngularSpeed = p_contentReader.ReadSingle();
            p_layer.Edges = p_contentReader.ReadObject<List<Edge>>();
            return p_layer;
        }
    }
}
